<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<title>无标题文档</title>
<script src="js/jquery.js"></script>
    <script src="../jquery-2.2.3.min.js"></script>
    <script src="../method.js"></script>
<#include "public/app/mxcss.ftl">
</head>

<body>
<article class="hometop"><a href="javascript:history.back(-1);" class="left"><img src="../images/arrow-left.png"></a> <span>设置登录密码</span> </article>
<article class="usercenter">
    <section class="two">        
        <section class="userlist mt22">
            <ul>
                <li>
                    <ul>
                        <li class="fl"> <span>设置登录密码：</span> </li>
                        <li class="fl"> <span><input type="password" id="firstPassword"></span></li>
                    </ul>
				</li>
                <li>
                    <ul>
                        <li class="fl"> <span>重复登录密码：</span> </li>
                        <li class="fl"> <span><input type="password" id="secondPassword"></span></li>
                    </ul>
				</li>
            </ul>
        </section>
        <aside class="ml22 mr22 mb22 mt22"> <a href="javascript:setPassword()" class="btn btn-orange">下一步</a> </aside>
        <p>温馨提示：8-20位数字、字母或符号组合。</p>
    </section>
</article>
<script>
    function setPassword(){
        var firstPassword = $("#firstPassword").val();
        var secondPassword = $("#secondPassword").val();
        if(firstPassword != secondPassword){
            alert("两次输入的密码不同");
            return ;
        }
        var data = {password : firstPassword};
        var url = "/register/addregpassword";
        postReq(url,data,function(result){
            if(result.success){
                alert("设置成功");
                location.href="/bindcard/bindcardfir";
            }else{
                alert(result.msg);
            }
        })
    }
</script>
</body>
</html>